﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace BLL.Services.Authors.Listing
{
    public class AuthorListing
    {
        public AuthorListing()
        {
            Authors = new List<Author>();
            Filter = new AuthorFilter();
        }

        public List<Author> Authors { get; set; }

        public int Page { get; set; }

        public int TotalPages { get; set; }

        public int Size { get; set; }

        public int Direction { get; set; }

        public string Column { get; set; }

        public AuthorFilter Filter { get; set; }

        public class Author
        {
            public int AuthorId { get; set; }

            [Display(Name = "First Name")]
            public string FirstName { get; set; }

            [Display(Name = "Last Name")]
            public string LastName { get; set; }

            [Display(Name = "Count Books")]
            public int CountBooks { get; set; }
        }
    }
}
